package cn.johnyu.base.model;

/*
CREATE TABLE Orders
(
    order_id    INT AUTO_INCREMENT PRIMARY KEY,
    customer_id INT,
    book_id     INT,
    order_date  DATE,
    quantity    INT,
    price       DECIMAL(5, 2),
    order_type  ENUM ('ebook', 'print')
#                     ,FOREIGN KEY (customer_id) REFERENCES Customers(customer_id),
#                         FOREIGN KEY (book_id) REFERENCES Books(book_id)
);
根据数据库表的字段定义实体类Order

 */


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Order {
    private Integer id;
    private Date orderDate;
    private Integer quantity;
    private BigDecimal price;
    private String orderType;
    private Book book;
    private Customer customer;

}
